package com.migo.api;

import com.migo.annotation.IgnoreAuth;
import com.migo.service.ProductService;
import com.migo.utils.R;
import org.apache.commons.collections.map.HashedMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Wes on 2019/1/15.
 */
@RestController
@RequestMapping("/api")
public class ApiProductController  extends ApiBaseController{

    @Autowired
    private ProductService productService;

    /**
     * 查询产品列表
     */
    @IgnoreAuth
    @RequestMapping("/queryProductList")
    public R queryProductList() throws Exception {
        return R.ok().put("data",productService.queryList(new HashedMap()));
    }
}
